package behavioralPattern.chain_of_responsibility.example01;

/**
 * 客户端
 */
public class Client {
    public static void main(String[] args) {
        Handler a = new Handler_A();
        Handler b = new Handler_B();
        Handler c = new Handler_C();

        // 创建处理链
        a.setSuccessor(b);
        b.setSuccessor(c);

        RequestData requestData = new RequestData("ABCDEFG");

        // 调用处理链头部的方法
        a.handle(requestData);
    }
}
